import java.util.Scanner;

public class Lianxi______6 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        while (true) {
            System.out.println("考试是否合格？");
            String ask = input.nextLine();

            if (ask.equals("合格")) {
                System.out.println("合格");
                break;

            }else if (ask.equals("不合格")) {
                System.out.println("不合格");
                System.out.println("上午学习理论，下午上机");
                continue;
            }else {
                System.out.println("你输入有误");
            }
        }
    }
}